-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release-18.0] VReplication: Fix vtctldclient SwitchReads related bugs and move the TestBasicV2Workflows e2e test to vtctldclient (#15579) #15583
Conversation
Hello @mattlord, there are conflicts in this backport. Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually. Make sure you replace
|
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
I can't understand why these changes are needed without an issue that describes the bugs you found and are trying to fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See prior comment
Yeah, it's a bit odd. Sorry about that. I'll create 1 or 2 issues and link them in all of the related PRs, including this one. There were two general bugs, both related to switchReads:
The other things were minor changes/improvements related to the code during the investigation. But these were pretty significant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fixes 💯
Thank you for writing up the original issues, that made it easy to review this PR and spot the bug fixes.
@@ -213,7 +213,7 @@ func TestFile(t *testing.T) { | |||
logger.Send(&logMessage{"test 2"}) | |||
|
|||
// Allow time for propagation | |||
time.Sleep(10 * time.Millisecond) | |||
time.Sleep(100 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, I assume 10 ms was too slow? These sleeps in CI have always been a bit of a headache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had seen it flake.
@@ -670,6 +670,7 @@ func VttabletProcessInstance(port, grpcPort, tabletUID int, cell, shard, keyspac | |||
Binary: "vttablet", | |||
FileToLogQueries: path.Join(tmpDirectory, fmt.Sprintf("/vt_%010d_querylog.txt", tabletUID)), | |||
Directory: path.Join(os.Getenv("VTDATAROOT"), fmt.Sprintf("/vt_%010d", tabletUID)), | |||
Cell: cell, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is a pretty big miss.
@@ -63,7 +63,7 @@ func (tm *TabletManager) CreateVReplicationWorkflow(ctx context.Context, req *ta | |||
} | |||
// Use the local cell if none are specified. | |||
if len(req.Cells) == 0 || strings.TrimSpace(req.Cells[0]) == "" { | |||
req.Cells = append(req.Cells, tm.Tablet().Alias.Cell) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♀️
Description
This is a backport of #15579
Fixes: #15594